package org.example

import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Property
import javax.inject.Inject

/**
 * The SlackExtension class defines a custom extension for the plugin.
 * This allows users to configure the plugin in their build script via a DSL block, e.g.:
 *
 * slack {
 *     token = "..."
 *     channel = "#general"
 *     message = "Hello from Gradle!"
 * }
 */
abstract class SlackExtension @Inject constructor(objects: ObjectFactory) {

    // The Slack API token used to authenticate requests
    val token: Property<String> = objects.property(String::class.java)

    // The name or ID of the Slack channel to send the message to
    val channel: Property<String> = objects.property(String::class.java)

    // The message content to send to the channel
    val message: Property<String> = objects.property(String::class.java)
}
